home *** CD-ROM | disk | FTP | other *** search
/ PC Format 25 / PCFormat 1993-10.iso / UTILS.ZIP / CHKEXNET.BAT < prev    next >
DOS Batch File  |  1992-05-20  |  853b  |  28 lines

  1. @echo off
  2. if "%1"=="" goto help
  3. if not exist %1 goto no_file
  4. echo %1 is a diskfile
  5. goto end
  6. :no_file
  7. if exist %1\chkexnet.nul goto subdir
  8. ctty nul
  9. rem>%1\chkexnet.nul
  10. ctty con
  11. if not exist %1\chkexnet.nul goto no_subdir
  12. del %1\chkexnet.nul >nul
  13. :subdir
  14. if exist %1\*.* echo %1 is a non-empty subdirectory
  15. if not exist %1\*.* echo %1 is an empty subdirectory
  16. goto end
  17. :no_subdir
  18. echo %1 does not exist or is write protected and can not be checked
  19. goto end
  20. :help
  21. echo CHKEXNET by Jim Groeneveld, NL, 20/5-92.
  22. echo Checks existence (or not) of some name as a disk file or subdirectory.
  23. echo Syntax: CHKEXNET name
  24. echo in which 'name' may be any combination of drive:path without trailing '\'.
  25. echo To check a root dir of some drive use '\.' or 'd:\.' .
  26. echo Output: textual report of existence, adapt for specific purposes.
  27. :end
  28.